package com.sg.service.impl;

import com.sg.bean.OrderStatus;
import com.sg.dao.OrderStatusDao;
import com.sg.service.OrderStatusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author lyx
 * 订单状态业务逻辑实现
 */
@Service
public class OrderStatusServiceImpl implements OrderStatusService {
    @Autowired
    OrderStatusDao orderStatusDao;
    /**
     * 查询全部订单状态
     * @return 订单状态集合
     */
    public List<OrderStatus> findAll() {
        return orderStatusDao.findAll();
    }

    /**
     * 根据订单状态编号查询订单状态
     * @param osId 订单状态编号
     * @return 订单状态对象
     */
    public OrderStatus findById(int osId) {
        return orderStatusDao.findById(osId);
    }
}
